package com.github.llyb120.qiuyasql.entity;

import lombok.Data;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * @Author: Administrator
 * @Date: 2020/10/4 16:24
 */
@Data
public class TableEntity {

    private String table;
    private List<TableField> fields = new CopyOnWriteArrayList<>();
    private Map<String, TableField> fieldMap = new ConcurrentHashMap<>();


    public void put(String key, TableField field){
        fields.add(field);
        fieldMap.put(key, field);
    }

}
